﻿function btnDel() {
    hideMenu();
    //删除自己
    G_CLICKELEMENT.remove();
}

function btnPre() {
    hideMenu();
    //删除上级对象
    deleteparent(G_CLICKELEMENT);
}

function deleteparent(p)
{
    if(p && p.length >0 && p[0].tagName != "BODY"){
        //showlog(p[0].tagName+":"+ p.html())
        $(domNode+",br",p.prevAll()).remove();
        deleteparent(p.parent());
    }
}

function btnNext() {
    hideMenu();
    //查找所有之后的兄弟节点
    //G_CLICKELEMENT.nextAll().remove();
    deletenext(G_CLICKELEMENT);
}

function deletenext(p)
{
    if(p && p.length >0 && p[0].tagName != "BODY"){
        $(domNode+",br",p.nextAll()).remove();
        deletenext(p.parent());
    }
}
